<script type="text/javascript" src="<?php echo SKINSPATH; ?>/admin/js/move.js"></script>
<div class="content-box">
    <div class="box-header clear">
        <h2><?php echo lang('pg_add_product') ?></h2>
    </div>
    <div class="box-body clear">
        <?php echo validation_errors('<li class="error">', '</li>'); ?>
        <?php echo form_open(base_url() . 'product/add'); ?>
        <div class="form-field clear">
            <label class="form-label fl-space2"><?php echo lang('lbl_product_name') ?> :(<span class="required">*</span>)</label>
            <input type="text" value="<?php echo set_value('product_name'); ?>" name="product_name" class="text" maxlength="10" />
        </div>
        <div class="form-field clear">
            <label class="form-label fl-space2"><?php echo lang('lbl_status') ?> :</label>
            <select name="category_id">
            	<option value=""><?php echo lang('lbl_select_category') ?></option>
            <?php 
            foreach($categorys as $item){
				echo "<option value='".$item->id."'>".$item->category_name."</option>";
			}
            ?>
            </select>
        </div>
        <div class="form-field clear">
            <table>
                <tr>
                    <td width = "20px">
                        <?php echo lang('lbl_provider_list') ?><br/>
                        <select name="providers[]" multiple="multiple" size="10" style="height:250px;width:150px" id="part">
                            <?php foreach ($providers as $list) { ?>
                                <option value="<?php echo $list->id; ?>"><?php echo $list->provider_name; ?></option>
                            <?php } ?>

                        </select>
                    </td>
                    <td align="center" valign="middle">
                        <input type="button" onClick="move(this.form.part, this.form.layout);" value="=>"><br />
                        <input type="button" onClick="move(this.form.layout, this.form.part)" value="<=">
                    </td>
                    <td>
                        <?php echo lang('lbl_provider_selected') ?><br/>
                        <select name="provider_id[]" multiple="multiple" size="10" style="height:250px;width:150px" id="layout">
                            <?php foreach ($provider_ids as $list) { ?>
                                <option value="<?php echo $list->id; ?>"><?php echo $list->provider_name; ?></option>
                            <?php } ?>
                        </select>
                    </td>
                </tr>
            </table>
        </div>
        <div class="form-field clear">
            <label class="form-label fl-space2"><?php echo lang('lbl_status') ?> :</label>
            <?php echo form_dropdown('status', $status); ?>
        </div>
        <div class="form_submit">
            <input type="submit" onclick="multi_selected(this.form.layout);" class="submit" value="<?php echo lang('btn_save') ?>" id="save" name="save">
            <input onclick='location.href = "<?php echo base_url(); ?>product"' type="button" class="submit" value="<?php echo lang('btn_cancel') ?>" name="cancel">
        </div>
        <?php echo form_close(); ?>
    </div>
</div>